﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TinTucList.ascx.cs" Inherits="TinTucList" %>
<div class="MainFilter" runat="server" visible="false">
    <span class="headertext" visible="false" runat="server">Ngôn ngữ:</span>
    <asp:DropDownList ID="cmbLanguage" runat="server" Width="112px" AutoPostBack="True"
        OnSelectedIndexChanged="cmbLanguage_SelectedIndexChanged" Visible="false">
        <asp:ListItem Text="Vietnamese" Selected="True" Value="vi-VN"></asp:ListItem>
        <asp:ListItem Value="en-US">English</asp:ListItem>
    </asp:DropDownList>
    <span class="headertext">Chuyên mục</span>  <asp:DropDownList ID="cmbChuyenMuc" 
        runat="server" Width="175px" 
        onselectedindexchanged="cmbChuyenMuc_SelectedIndexChanged" 
        AutoPostBack="True">
            </asp:DropDownList>
    <span class="headertext">Vùng hiển thị:</span>
    <asp:DropDownList ID="cmbStatus" runat="server" Width="100px" AutoPostBack="True"
        OnSelectedIndexChanged="cmbStatus_SelectedIndexChanged">
        <asp:ListItem Selected="True" Value="0">--Tất cả--</asp:ListItem>
        <asp:ListItem Value="1">Trang tin</asp:ListItem>
        <asp:ListItem Value="2">Tin nổi bật</asp:ListItem>
    </asp:DropDownList>
</div>
<asp:GridView ID="grvArticleInfo" runat="server" AutoGenerateColumns="False" AllowPaging="True"
    AllowSorting="True" OnPageIndexChanging="grvArticleInfo_PageIndexChanging" PageSize="20"
    Font-Size="Small" OnSorting="grvArticleInfo_Sorting" CssClass="adminlist">
    <Columns>
        <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px">
            <HeaderTemplate>
                <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
            </HeaderTemplate>
            <ItemTemplate>
                <input id="chkSelect" value='<% # "?tabid=5&mod=" + WebComponents.ConvertType.Encode(this.AddModule) + "&id=" + Eval("ArticleID") %>' title='<%# Eval("ArticleID") %>'
                    runat="server" type="checkbox" />
            </ItemTemplate>
            <ItemStyle VerticalAlign="Middle" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ID" SortExpression="ArticleID">
            <ItemTemplate>
                <asp:Label ID="lblArticleID" runat="server" Text='<%# Eval("ArticleID") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="40px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ti&#234;u đề" SortExpression="Title">
            <ItemTemplate>
                <a href="?tabid=5&mod=<%=WebComponents.ConvertType.Encode(this.AddModule) %>&id=<%# Eval("ArticleID")  %>">
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                </a>
            </ItemTemplate>
            <HeaderStyle Width="250px" HorizontalAlign="left" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Mô tả ngắn">
            <ItemTemplate>
                <asp:Label ID="lblDescrip" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="left" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ng&#224;y tạo" SortExpression="AddedDate" ItemStyle-HorizontalAlign="center">
            <ItemTemplate>
                <asp:Label ID="lblAddedDate" runat="server" Text='<%# ((DateTime)Eval("AddedDate")).ToShortDateString() %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="70px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Lần xem" SortExpression="ViewCount">
            <ItemTemplate>
                <asp:Label ID="lblViewCount" runat="server" Text='<%# Eval("ViewCount") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="60px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
       <%-- <asp:TemplateField HeaderText="Vị trí" SortExpression="OrderId">
            <ItemTemplate>
                <asp:Label ID="lblOrderId" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="50px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>--%>
    </Columns>
    <EmptyDataTemplate>
        <div align="center" id="EmptyData">
            Không có thông tin...</div>
    </EmptyDataTemplate>
    <RowStyle CssClass="row0" />
    <AlternatingRowStyle CssClass="row1" />
</asp:GridView>
